#include <cstdio>
#include <algorithm>

using namespace std;

int T, N, L;

bool cmp( const int &a, const int &b )
{
    if ( b < a )
        return L * a - L * b > T * a * b;
    return L * b - L * a <= T * a * b;
}

int main( )
{
    int a[ 10 ], i, ans, cas = 1;
    while ( scanf("%d", &L) && L )
    {
        scanf("%d%d", &N, &T);
        for ( i = 0; i < N; i++ )
            scanf("%d", &a[ i ]);
        sort( a, a + N, cmp );
        printf("Case %d: %.0lf\n", cas++, ( N - 1 ) * T + double( L ) / a[ N - 1 ]);
    }
    return 0;
}
